package com.dongdongshop.pojo.vo;

import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

import java.io.Serializable;
import java.time.LocalDateTime;

@Document(collection = "comment")
public class Comment implements Serializable {

    @Id
    private String id; // 主键

    private String content;//吐槽内容

    private Long goodsId; // 商品id

    private Long userId; // 用户id

    private String userName;// 用户名

    private Integer starRating; // 星级

    private String imgAddress; //图片地址

    private String goodsAndSpecs; //商品名称和规格

    private LocalDateTime commentTime; //评论时间

    private String pid; //子评论id

    private Long ikedNum; // 点赞数

    @Override
    public String toString() {
        return "Comment{" +
                "id='" + id + '\'' +
                ", content='" + content + '\'' +
                ", goodsId=" + goodsId +
                ", userId=" + userId +
                ", userName='" + userName + '\'' +
                ", starRating=" + starRating +
                ", imgAddress='" + imgAddress + '\'' +
                ", goodsAndSpecs='" + goodsAndSpecs + '\'' +
                ", commentTime=" + commentTime +
                ", pid='" + pid + '\'' +
                ", ikedNum=" + ikedNum +
                '}';
    }

    public Comment() {
    }

    public Comment(String id, String content, Long goodsId, Long userId, String userName, Integer starRating, String imgAddress, String goodsAndSpecs, LocalDateTime commentTime, String pid, Long ikedNum) {
        this.id = id;
        this.content = content;
        this.goodsId = goodsId;
        this.userId = userId;
        this.userName = userName;
        this.starRating = starRating;
        this.imgAddress = imgAddress;
        this.goodsAndSpecs = goodsAndSpecs;
        this.commentTime = commentTime;
        this.pid = pid;
        this.ikedNum = ikedNum;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Long getGoodsId() {
        return goodsId;
    }

    public void setGoodsId(Long goodsId) {
        this.goodsId = goodsId;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public Integer getStarRating() {
        return starRating;
    }

    public void setStarRating(Integer starRating) {
        this.starRating = starRating;
    }

    public String getImgAddress() {
        return imgAddress;
    }

    public void setImgAddress(String imgAddress) {
        this.imgAddress = imgAddress;
    }

    public String getGoodsAndSpecs() {
        return goodsAndSpecs;
    }

    public void setGoodsAndSpecs(String goodsAndSpecs) {
        this.goodsAndSpecs = goodsAndSpecs;
    }

    public LocalDateTime getCommentTime() {
        return commentTime;
    }

    public void setCommentTime(LocalDateTime commentTime) {
        this.commentTime = commentTime;
    }

    public String getPid() {
        return pid;
    }

    public void setPid(String pid) {
        this.pid = pid;
    }

    public Long getIkedNum() {
        return ikedNum;
    }

    public void setIkedNum(Long ikedNum) {
        this.ikedNum = ikedNum;
    }
}